#include <stdio.h>

#include "sort.h"

void printArray(int *array, int length) {
    for (int i = 0; i < length; ++i) {
        printf("%d ", array[i]);
    }
    printf("\n");
}

int main() {
    int array1[10] = {1, 8, 2, 4, 6, 3, 5, 9, 0, 7};

    printf("排序前: ");
    printArray(array1, 10);
    mergerSort(array1, 10);
    printf("归并排序后: ");
    printArray(array1, 10);
    printf("\n");

    int array2[10] = {2, 8, 4, 1, 6, 3, 5, 9, 0, 7};
    printf("排序前: ");
    printArray(array2, 10);
    selectSort(array2, 10);
    printf("选择排序后: ");
    printArray(array2, 10);

    return 0;
}